#pragma once

class DriverInfo
{
public:
	DriverInfo(void);
	virtual ~DriverInfo(void);

	char accountName[33];
	long mID;
	char mDriverName[33];
	char mDriverNumStr[5]; 
	char mDriverTeam[33];
	char mCategoryName[33];
	char mCategoryGroup[33];
	int mCategoryImageColorIndex;
	int mCategoryTextColorIndex;
	char mClassName[33];
	int mClassLogoIndex;
	int mNameAvatarIndex;
	char mThreeLetterName[4];

	double mBestSector1;
	double mBestSector2;	// sector2 (plus sector 1)
	double mBestLapTime;

	double mSector1OfBestLap;
	double mSector2OfBestLap;

	double mLastLapTime;

	double currentLaptime; // real time elapsed since lap start
	double oldBestLapTime; // used to compute gap when doing a new best lap

	bool isInPit;
	short lapCompleted;
	short memlapCompleted;
	double lapDistance;
	signed char finishStatus; // 0=none, 1=finished, 2=dnf, 3=dq
	double timeBehindNextInFront;
	double timeBehindLeaderAtCut;
	bool firstInCatAtCut;
	bool isSpinAround;
	// TODO: may be we need to compute a real average laptime (Inlaps, outlaps and laps slower than (1.06 * fastest) should be ignored.)
	// for now it is only the estimated lap time (so, it is not an average)
	double averageLapTime;
	double lapStartET;

	unsigned char place;

	int mNumPitstops;

	// current speed trap data
	double lastSpeedAtSpeedTrap;
	double speedAtSpeedTrap;
	bool speedTrapCanBeDisplayed;
	double speedTrapCanBeDisplayedET;

	bool isOffTrack;

	double totalDistance;
	double maxSpeed;
	double curMaxSpeed;
	double lastMaxSpeed;

	double s1;
	double s2;
	double s3;

	double x;
	double y;
	double z;
	int offsetNumPitStop;
}; 

